package com.hiultra.archive.service.impl;

import com.hiultra.archive.domain.ArcEnvironment;
import com.hiultra.archive.mapper.ArcEnvironmentMapper;
import com.hiultra.archive.service.IArcEnvironmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 环境Service业务层处理
 * 
 * @author ls
 * @date 2022-07-28
 */
@Service
public class ArcEnvironmentServiceImpl implements IArcEnvironmentService
{
    @Autowired
    private ArcEnvironmentMapper arcEnvironmentMapper;

    /**
     * 查询环境
     * 
     * @param environmentId 环境主键
     * @return 环境
     */
    @Override
    public ArcEnvironment selectArcEnvironmentByEnvironmentId(Long environmentId)
    {
        return arcEnvironmentMapper.selectArcEnvironmentByEnvironmentId(environmentId);
    }

    /**
     * 查询环境列表
     * 
     * @param arcEnvironment 环境
     * @return 环境
     */
    @Override
    public List<ArcEnvironment> selectArcEnvironmentList(ArcEnvironment arcEnvironment)
    {
        return arcEnvironmentMapper.selectArcEnvironmentList(arcEnvironment);
    }

    /**
     * 新增环境
     * 
     * @param arcEnvironment 环境
     * @return 结果
     */
    @Override
    public int insertArcEnvironment(ArcEnvironment arcEnvironment)
    {
        return arcEnvironmentMapper.insertArcEnvironment(arcEnvironment);
    }

    /**
     * 修改环境
     * 
     * @param arcEnvironment 环境
     * @return 结果
     */
    @Override
    public int updateArcEnvironment(ArcEnvironment arcEnvironment)
    {
        return arcEnvironmentMapper.updateArcEnvironment(arcEnvironment);
    }

    /**
     * 批量删除环境
     * 
     * @param environmentIds 需要删除的环境主键
     * @return 结果
     */
    @Override
    public int deleteArcEnvironmentByEnvironmentIds(Long[] environmentIds)
    {
        return arcEnvironmentMapper.deleteArcEnvironmentByEnvironmentIds(environmentIds);
    }

    /**
     * 删除环境信息
     * 
     * @param environmentId 环境主键
     * @return 结果
     */
    @Override
    public int deleteArcEnvironmentByEnvironmentId(Long environmentId)
    {
        return arcEnvironmentMapper.deleteArcEnvironmentByEnvironmentId(environmentId);
    }
}
